<div class="layuimini-container">
    <div class="layuimini-main">
        <table id="currentTable" class="layui-table layui-hide"
               data-auth-add="{:auth('member.user/add')}"
               data-auth-edit="{:auth('member.user/edit')}"
               data-auth-delete="{:auth('member.user/delete')}"
               data-auth-password="{:auth('member.user/password')}"
               lay-filter="currentTable">
        </table>
    </div>
</div>

<script type="text/javascript">

    require(["jquery", "easy-admin"], function ($, ea) {

        var init = {
            table_elem: '#currentTable',
            table_render_id: 'currentTableRenderId',
            index_url: 'member.transfer_credit/index',
            modify_url: 'member.transfer_credit/modify',
            add_url: 'member.transfer_credit/add',
            edit_url: 'member.transfer_credit/edit',
        };


        ea.table.render({
            init: init,
            cols: [[
                {type: "checkbox"},
                {field: 'id', width: 120, title: 'ID'},
                {field: 'title', width: 160, title: '积分类型'},
                {field: 'value', title: '值', width: 200, search: 'text'},
                {field: 'is_pay', title: '是否支持支付', width: 200, search: 'select', selectList: {0: '否', 1: '是'}, templet: ea.table.switch},
                {field: 'is_withdraw', title: '是否支持提现', width: 200, search: 'select', selectList: {0: '否', 1: '是'}, templet: ea.table.switch},
                {field: 'is_transfer', title: '是否支持转账', width: 200, search: 'select', selectList: {0: '否', 1: '是'}, templet: ea.table.switch},
                {
                    width: 180,
                    title: '操作',
                    templet: ea.table.tool,
                    operat: [
                        [{
                            text: '编辑',
                            url: init.edit_url,
                            method: 'open',
                            auth: 'edit',
                            class: 'layui-btn layui-btn-xs layui-btn-success',
                            extend: 'data-full="true"',
                        }],
                    ]
                }
                // {field: 'is_convert', title: '是否支持转余额', width: 200, search: 'select', selectList: {0: '否', 1: '是'}, templet: ea.table.switch},
            ]],
        });

        ea.listen();

    });
</script>